Cast Functions Operators MySQL Tutorial

Normally, sorting of ENUM columns occurs using the internal numeric values.
Casting the values to CHAR results in a lexical sort:

mysql>
mysql> SELECT enum_col FROM tbl_name ORDER BY CAST(enum_col AS CHAR);
mysql>