Hi,
Please try this -
insert into auditHistory
(auditOrgId, auditPropID, auditTableName, auditTableColumn, auditColumnType, auditAction, auditData)
SELECT 'IGT', 'IGT', 'ImageTypes', B.COLUMN_NAME, B.DATA_TYPE, 'I',
CASE WHEN B.COLUMN_NAME = 'CompanyNbr' THEN CONVERT(NVARCHAR,I.CompanyNbr)
WHEN B.COLUMN_NAME = 'ImageType' THEN CONVERT(NVARCHAR,I.ImageType)
END...