请问什么是在MYSQL中编写此存储过程的正确方法-我从phpmyadmin中收到1064错误
BEGIN
DECLARE @Correct VARCHAR(50)
SELECT @Correct = answer FROM tbl_questions WHERE id = @getid
SELECT CASE @Correct
WHEN 'OptionOne' THEN (SELECT OptionOne FROM tbl_questions WHERE id = @getid)
WHEN 'OptionTwo' THEN (SELECT OptionTwo FROM tbl_questions WHERE id = @getid)
WHEN 'OptionThree' THEN (SELECT OptionThree FROM tbl_questions WHERE id = @getid)
WHEN 'OptionFour' THEN (SELECT OptionFour FROM tbl_questions WHERE id = @getid)
END Answer
FROM tbl_questions
WHERE id = @getid;
END;