I have a table with a column Col1 which has values as below:
SELECT 'XXX-T09-CFO Signature' AS Col1
UNION
SELECT 'YYY-T140 - Update Funding Authorization Status to Completed'
UNION
SELECT'ZZZ-T13-PAB Chair Signature'
My output col2 should have string before the word "Signature" from col1.If the word Signature is not found it should be set to NULL
SELECT 'XXX-T09-CFO Signature' AS Col1,'CFO' as Col2
UNION
SELECT 'YYY-T140 - Update Funding Authorization Status to Completed' ,Null
UNION
SELECT'ZZZ-T13-PAB Chair Signature','PAB Chair'