先占个坑,sql 版本的swith caseSELECT 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 ;