CASE WHEN field1 > '10000' THEN '1'
WHEN field2 BETWEEN '5001' AND '9999' THEN '2'
WHEN field3 BETWEEN '2501' AND '5000' THEN '3'
WHEN field4 BETWEEN '0' AND '2500' THEN '4'
I'd use MySQL's CASE, which should work just like MS-SQL's CASE. I'm highly suspicious that you didn't mean to use different column names (Field1 through Field4 in your example). That would be a bad thing in most cases!