Can I use a Merge transform to replace field NAMES instead of their values?

I’m querying Azure logs to retrieve some API request data, broken down by client. Here, each of the numbered headers are a Client ID.

QUERY A

+--------------------+-----+-----+----+
| Performance Bucket | 1   | 2   | 3  |
+--------------------+-----+-----+----+
| <250ms             | 503 | 325 | 43 |
+--------------------+-----+-----+----+
| 250ms-500ms        | 244 | 31  | 7  |
+--------------------+-----+-----+----+
| 500ms-1s           | 17  | 4   | 0  |
+--------------------+-----+-----+----+

I also have a table that links Client ID to Client Name:

QUERY B

+----+----------------+
| Id | Name           |
+----+----------------+
| 1  | Pet Mart       |
+----+----------------+
| 2  | John's Burgers |
+----+----------------+
| 3  | Retail Supply  |
+----+----------------+

It’s fairly trivial to replace the ID with a Name in the values (using a Merge), however, in this unique case, I need to replace the field name (the table headers). My goal is the following:

DESIRED OUTPUT

+--------------------+----------+----------------+---------------+
| Performance Bucket | Pet Mart | John's Burgers | Retail Supply |
+--------------------+----------+----------------+---------------+
| <250ms             | 503      | 325            | 43            |
+--------------------+----------+----------------+---------------+
| 250ms-500ms        | 244      | 31             | 7             |
+--------------------+----------+----------------+---------------+
| 500ms-1s           | 17       | 4              | 0             |
+--------------------+----------+----------------+---------------+

Is there a way to achieve this?