Something like this:SELECT
[A],
COUNT(A) AS ColumnName,
[B] AS ColumnName,
CASE
WHEN [C] = 0 THEN 'Zero'
WHEN [C] = 1 THEN 'One'
END
FROM
[table]
WHERE
OrderId = '##########'
GROUP BY
A,
B,
CASE
WHEN [C] = 0 THEN 'Zero'
WHEN [C] = 1 THEN 'One'
END
If there could be nulls or other values in column C, you would want to add an else condition to the CASE expression