Sorting by string in concrete order

Hello everybody i’m little bit stack with custom ordering. I have database column which is called criticality and has string values:


Is it possible to map that as numbers for order?

Low = 1
Medium = 2
Critical= 3

As DESC i want to have Critical as first and not as last as DESC on strings works.

Thank you very much

You can use case.

FROM default AS d 
WHERE .....
ORDER BY  CASE  d.criticality WHEN "Low" THEN 1 WHEN "Medium" THEN 2 WHEN "Critical" THEN 3 ELSE 0 END DESC;