Essentially I have the following stored procedure that give the right response, but I would like to add additional logic that states if the response for TimeDiff is negative, respond with a 0, otherwise respond with difference (TimeLeft).
BEGIN
SELECT
`Person`,`Code`,
CASE
WHEN `Problem` = "Large"
THEN 500 - (TIME_TO_SEC((TimeDiff(Now(),`Start`)/60))) END AS TimeLeft
FROM Table1
WHERE `Code` = "1111";
END