I´ve Created a source file with your data (Quest.xls) and used it to obtain the desired table. You can do it with CrossTable (it has an assistant to do it. It´s a Transformation Step)
Please se below the script:
LOAD [Question Code],
(ooxml, embedded labels, table is [Referential file]);
CrossTable([Question Code], Answer, 2)
(ooxml, embedded labels, table is Quest);
-- If you have Endless questions, you can use * instead of field names. Hope this helps.