Check out example codes for "mariadb case switch". It will help you in understanding the concepts better.

Code Example 1

mysql> SELECT CASE  WHEN 2>3 THEN 'this is true' ELSE 'this is false' END; 
+-------------------------------------------------------------+
| CASE  WHEN 2>3 THEN 'this is true' ELSE 'this is false' END |
+-------------------------------------------------------------+
| this is false                                               | 
+-------------------------------------------------------------+

Learn ReactJs, React Native from akashmittal.com