mysql enum is not case sensitive it match the first one without case-sensivity

From the doc:

When retrieved, values stored into an ENUM column are displayed using the lettercase that was used in the column definition. Note that ENUM columns can be assigned a character set and collation. For binary or case-sensitive collations, lettercase is taken into account when assigning values to the column.

So you have to change the column collation.


My solution is changing the collation to ASCII:

ALTER TABLE `your_table` CHANGE `strategy` ENUM('g', 'G', 'r', 'R')
CHARACTER SET ASCII COLLATE ascii_bin NOT NULL DEFAULT 'g';