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
Perhaps use LEFT()?
LEFT()
SELECT CASE WHEN LEFT(digits, 4) = '6901' THEN substr(digits,4) WHEN LEFT(digits, 2) = '91' THEN substr(digits,2) END FROM raw
Should be more performant than the LIKE.