Postgresql case when substring. When) FROM 1 for 1) AS letter, substring((Case.