You can use the ROUND function to round a value to an integer:
ROUND(INT, 100 * AVG(CASE WHEN col2 = col3 THEN 1.0 ELSE 0.0 END), 0) AS matchPercent
This will save the type, for example, a rounded float will remain a float . If you also need to return an int data type (or other integer data types), you also need to convert it:
CONVERT(INT, ROUND(INT, 100 * AVG(CASE WHEN col2 = col3 THEN 1.0 ELSE 0.0 END), 0)) AS matchPercent
source share