Tag: SQL CASE

  • SQL Case Statement

    Cases are used to return a specific value (hardcoded or field from the table) based on a condition.

    Example:

    CASE 
     WHEN [Condition] THEN [Return Value/ Field]
     ELSE [If When condition not met return this value/field]
    END;