CASE / WHEN in T-SQL
CASE / WHEN in T-SQL: CASE / WHEN in T-SQL.
Updated
- CASE / WHEN in T-SQL (Journeyman): CASE picks a value by conditions, like if and else if. Use it to label rows, to count only the rows that match with SUM(CASE ...), and to sort in a custom order.