Capturing Column Names in Dynamic SQL Statement
There's no TSQL api to examine the resultset shape of a procedure that returns multiple different resultset shapes.  For normal procs you can use sp_describe_first_result_set.

If you can afford to actually run the procedure and examine the results, the least-janky solution is to use SQL CLR.  In CLR you get a SqlDataReader that you can use to examine the resultset shape.