Help with Merge Statement in SQL

I would change the config table to be more scalable. Something like

CREATE TABLE tbl_Config
(
ID INT IDENTITY(1,1)
,FilePrefix VARCHAR(4)
,RecordType tinyint
,FromColumn VARCHAR(15)
,ToColumn VARCHAR(15)
)

Then the RecordType could be 1 = JoinColumn, 2 = Update, 3 = Insert/Update, etc..
so your joins would use RecordType 1, the update would use 2 or 3, the insert would use 2. and then dynamically generate your merge statement. The other issue you could run into is if the merge attempts to update more than 1 record at a time. It will return an error