midT-SQL
What is CASE expression?
Updated May 17, 2026
Short answer
Implements conditional logic in queries.
Deep explanation
CASE allows IF-ELSE logic inside SQL queries.
Real-world example
Classifying employees by salary band.
Common mistakes
- Missing ELSE clause.
Follow-up questions
- Simple vs searched CASE?
- Can CASE be used in WHERE?