CASE Statement


Case is used to check for a condition and return some value if it’s true/false.

Syntax:
case
when marks > 75 then ‘distinction’
when marks < 75 and marks > 36 then ‘Pass’
else ‘Fail’
End as Status