SQL CASE Statement

The SQL Server Case Statement is similar to the control flow statements (something like IF ELSE). This statement evaluates the series of conditional expressions provided in WHEN and returns the result set. SQL Server Case Statement Syntax The syntax of the case is shown below. CASE Input_Expression WHEN test_expression THEN result_expression ……… ELSE default_expression END … Read more