What is the best way to achieve this
INSERT INTO @TableName (@ColumnNames)
EXEC sp_executesql @SQLResult;
Where @TableName,
The best way is to write (or generate) all reqiured procedures for all table. 23 tables times 4 procedures (insert, update, delete and select) that can be generated automatically is nothing in dev time and pain compared to the so called "generic solution".
It's a path to poor perfomance, unreadable code, sql injection hazard and countless debuging hours.