In MySQL, the CASE
operator compares a list of conditions and returns one of multiple possible result expressions.
The CASE
expression is included in the SQL standard (ISO/IEC 9075), and most major RDBMSs support it.
MySQL also has the CASE
statement, which is slightly different to the CASE
operator. This article is about the CASE
operator.