Skip to content
  • There are no suggestions because the search field is empty.

T-SQL Script: Simple CASE

T-SQL Script: Simple CASE, Compares one expression to multiple possible values.

SELECT 
    CASE Status
        WHEN 'A' THEN 'Active'
        WHEN 'I' THEN 'Inactive'
        ELSE 'Unknown'
    END AS StatusDescription
FROM dbo.Users;