Is it possible to combine the CASE statement and the LIKE operator in a MySQL SELECT statement?
CASE
LIKE
SELECT
For Example, I am trying to query
Assuming the number of digits is constant, you could use something like this:
SELECT IF(digits > 919999, MOD(digits, 100), MOD(digits, 10000) FROM raw
Add 0's to match your actual number of digits.
0