像这样的东西:
SELECT
(
CASE
WHEN MOD(a.year, 12) = 0 THEN 'Monkey'
WHEN MOD(a.year, 12) = 1 THEN 'Rooster'
WHEN MOD(a.year, 12) = 2 THEN 'Dog'
WHEN MOD(a.year, 12) = 3 THEN 'Pig'
WHEN MOD(a.year, 12) = 4 THEN 'Rat'
WHEN MOD(a.year, 12) = 5 THEN 'Ox'
WHEN MOD(a.year, 12) = 6 THEN 'Tiger'
WHEN MOD(a.year, 12) = 7 THEN 'Hare'
WHEN MOD(a.year, 12) = 8 THEN 'Dragon'
WHEN MOD(a.year, 12) = 9 THEN 'Snake'
WHEN MOD(a.year, 12) = 10 THEN 'Horse'
WHEN MOD(a.year, 12) = 11 THEN 'Sheep'
END
) AS ZodiacYear
FROM
table a