I didn't test it, but I guess you could try to see if this works:
GROUP BY MonthKey, CASE WHEN @Parm1 = 2 THEN CorporateName END
I do not expect this to perform very well though. Dynamic SQL or repeating the query (preferably in separate stored procedures that are called from a master stored procedure) will almost certainly perform better.