SELECT Make, Model,
CASE
WHEN MIN(Year) = MAX(Year)
THEN MIN(Year)
ELSE CONCAT(MIN(Year), '-', MAX(Year))
END As Year,
OtherColumns
FROM tableName
GROUP BY Make, Model, OtherColumns
SELECT Make, Model,
CASE
WHEN MIN(Year) = MAX(Year)
THEN MIN(Year)
ELSE CONCAT(MIN(Year), '-', MAX(Year))
END As Year,
OtherColumns
FROM tableName
GROUP BY Make, Model, OtherColumns