I'm working in MYSQL and trying to write a CASE WHEN Statement with multiple AND X<Y conditions. When it is finished, the statement below will be much longer with 15 more AND conditions, but right now this shorter version won't verify. The purpose of this statement is simply to find the lowest value across 15 columns for each row. Thoughts on what is going wrong (or perhaps a simplier way to find the minimum?? (The "min" function only finds the lowest value out of all the rows in the column (and not out of all the columns in a row, whic is what I'm trying to find). Thanks!
SELECT
CASE WHEN `Venturer_Dist`< `Strategist_Dist` AND `Venturer_Dist`< `Operator_Dist`
THEN 'Venturer'
END
FROM transform_data_3