Articles → SQL SERVER → Case Statement In SQL Server
Case Statement In SQL Server
What Is The Case Statement?
Syntax
Case When <condition> then <value_to_be_returned_if_condition_is_satisfied> Else <value_to_be_returned_if_condition_is_not_satisfied> End
Example
Select (Case When Photo is not Null then 'Exists' Else 'Not Exists' End) From [Image]