I am fairly new to SQL and am doing a project with mySQL. Here is the my sql statement. As you can see from the attached spreadsheet, column F is zero and column G (titled END) shouldn't even be there. What am I doing wrong? I am trying to set qualified_amount=w2_wages times (either 0, .5 or 1).
SELECT e.employee, e.employee_title, e.w2_wages, t.risk, e.role, e.w2_wages*risk as qualified_amount,
WHEN 'low' THEN 1.0
WHEN 'med' THEN 0.5
FROM employees as e, titles as t
WHERE e.email='$email' AND e.campaign='$campaign'
AND t.email='$email' AND t.campaign='$campaign'
ORDER BY e.employee_title