Please note that both T and T1 refer to same table. We are trying to retrieve a maximum value and while retrieving max value, we are interested in those rows, which have equal columnC values.
select *
from table T
where T.columnA in (0,1,2,3)
and T.columnB = (select max(T1.columnB)
from table T1
where T1.columnC = T.columnC)