give a column name to values generated from case statement in sql code example
Example: give a column name to values generated from case statement in sql
SELECT *, CASE WHEN a = 'test' THEN 'yes' END as value FROM (
SELECT col1 as a FROM table
)