SELECT amount || ' ' ||
CASE WHEN amount % 100 / 10 = 1 THEN 'автомобилей'
WHEN amount % 10 = 1 THEN 'автомобиль'
WHEN amount % 10 IN (2,3,4) THEN 'автомобиля'
ELSE 'автомобилей'
END
FROM generate_series(0,600) AS source (amount)