你只需要做一些事情
WITH T(PaymentNumber) AS ( SELECT 1 UNION ALL SELECT 2 UNION ALL SELECT 3 UNION ALL SELECT 4 UNION ALL SELECT 5 UNION ALL SELECT 6 UNION ALL SELECT 7 UNION ALL SELECT 8 UNION ALL SELECT 9 UNION ALL SELECT 10 UNION ALL SELECT 11 UNION ALL SELECT 12 ) SELECT CASE WHEN PaymentNumber < 12 THEN FLOOR(1550.00/12) WHEN PaymentNumber = 12 THEN 1550.00 - 11*FLOOR(1550.00/12) END FROM T