WITH ctCounter AS ( SELECT 1 AS Number UNION ALL SELECT Number + 1 AS Number FROM ctCounter WHERE Number < 100 ) SELECT ISNULL(NULLIF(CONCAT(fizz.f, buzz.b), ''), c.Number) FROM ctCounter c LEFT JOIN (VALUES('fizz')) fizz(f) ON c.Number % 3 = 0 LEFT JOIN (VALUES('buzz')) buzz(b) ON c.Number % 5 = 0