Interested in helping build Docs? Read the Contribution Guide or share your feedback.
A logical test that creates different output based on the conditions of each CASE statement, closes with an END clause.
SELECT student_name AS 'Student',overall_gpa AS 'GPA',CASEWHEN overall_gpa > 3.0 THEN "Exceptional grades, keep up the good work!"WHEN overall_gpa BETWEEN 2.0 AND 3.0 THEN "Good job! Study hard this term!"ELSE "You're at risk of academic probation, seek help if needed."ENDFROM students;