先占个坑,sql 版本的swith case

SELECT Oldvote,
(CASE
WHEN Oldvote=1 THEN (SELECT NOW() from dual)
WHEN Oldvote=2 THEN 1
WHEN Oldvote=0 THEN 3
ELSE 3
END) as "number"
FROM dual ;
05-08 08:30