mysql> SELECT \'a\'=\'b\'=\'c\'; +-------------+ | \'a\'=\'b\'=\'c\' | +-------------+ | 1 | +-------------+ mysql> select \'a\'=0, \'b\'=\'c\'; +---
TEXT values are cast to INTEGER values by interpreting all the leading digits as a number. If there are no digits, it casts to 0.
So:
'123a' = 123 '4a' = 4 'a' = 0