In your DataSet, create a calulated field called something like GroupedCode
. Use an expression like:
=Switch(Fields!Code.Value = "A" or Fields!Code.Value = "B", "AB"
, Fields!Code.Value = "C" or Fields!Code.Value = "D", "CD"
, Fields!Code.Value = "C" or Fields!Code.Value = "D", "EF")
Now each row will have a field that puts them in one of three groups as required - in the Tablix you can use this calculated field like any other field; create a column group based on this and you will have your required three columns.