SELECT SCHEMA_NAME([O].[schema_id]) AS schema_name,
       O.name AS table_name,
       C.name AS column_name,
       [sc].[information_type],
       [sc].[label],
       [sc].[rank],
       [sc].[rank_desc]
       ,'ADD SENSITIVITY CLASSIFICATION TO ['+CAST(SCHEMA_NAME([O].[schema_id]) AS NVARCHAR(100))+'].['+CAST(o.[name] AS NVARCHAR(100))+'].['+CAST(c.name AS NVARCHAR(100))+']  WITH ( LABEL='''+CAST(sc.[label] AS NVARCHAR(100))+''', INFORMATION_TYPE='''+CAST(sc.[information_type] AS NVARCHAR(100))+''' '
       + CASE 
            WHEN sc.[rank_desc] IS NOT NULL THEN ', RANK='+sc.[rank_desc]
            ELSE ''
        END 
        +')'
  --sc.*
  FROM sys.sensitivity_classifications sc
  JOIN sys.objects O
    ON [sc].[major_id] = O.object_id
  JOIN sys.columns C
    ON [sc].[major_id] = C.object_id
   AND [sc].[minor_id] = [C].[column_id]
 --WHERE CAST(sc.[information_type] AS VARCHAR(500)) <> 'Other'
 --WHERE [O].[name] LIKE '[IIICommon_Bank_PTT_Master]'
 ORDER BY CAST([sc].[information_type] AS VARCHAR(500)), [schema_name], [table_name], [column_name];