Explanation
This is a standard MATCH formula where the lookup values come from column H, the array is the headers in Table1, and match type is zero, to force an exact match.
The only trick to the formula is the use of a structured reference to return a range for the table headers to the MATCH function:
Table1[#Headers]
The nice thing about this reference is that it will automatically adjust to any changes in the table. Even when columns are added or removed, the reference will continue to return the correct range.
Explanation
This is a standard INDEX formula. The only trick to the formula is the use of a structured reference to return a range for the table headers:
Table1[#Headers]
This range goes into INDEX for the array argument, with the index value supplied from column H:
=INDEX(Table1[#Headers],H5)
The result is the name of the first item in the header, which is “ID”.
Although the headers are in a horizontal array, with values in columns, INDEX will use the row number as a generic INDEX for one-dimensional arrays like this and correctly return the value at that position.