Replace Words in the parentheses to put into quotations - Unix / Linux : I want to replace the words in the parentheses to put into quotations. 
Below is the data I have in one of the variable data -

SELECT * FROM ( SELECT Table1 file2.txt file.txt QUEUES QDefinitions
Parameters TRAP-Deposit-DSTran.dat.2016-08-07 FROM CS_CASE WHERE 
ANT_CD='FI_BASE_TENANT') t1 LEFT OUTER JOIN Table2 t2 ON t2.CASE_ID=t1.CASE_ID LEFT OUTER JOIN Table3 t3 ON t3.SERVICE_XID=t1.SERVICE_XID LEFT OUTER JOIN Table4 t4 ON  t4.SERVICE_ID=t1.SERVICE_ID WHERE ( t1.CASESTATUs_CD = (NEW,RETIRED,PENDING,OPEN,CLOSED) OR t1.CASE_STATUS_NUM = (1,2,3,4) ) GROUP BY t1.CASE_REFERENCE,t2.LAST_SCRFP,t1.SERVICE_ID ORDER BY t2.LAST_SCRFP DESC

Here is what I want.


SELECT * FROM ( SELECT Table1 file2.txt file.txt QUEUES QDefinitions
Parameters TRAP-Deposit-DSTran.dat.2016-08-07 FROM CS_CASE WHERE 
ANT_CD='FI_BASE_TENANT') t1 LEFT OUTER JOIN Table2 t2 ON t2.CASE_ID=t1.CASE_ID LEFT OUTER JOIN Table3 t3 ON t3.SERVICE_XID=t1.SERVICE_XID LEFT OUTER JOIN Table4 t4 ON  t4.SERVICE_ID=t1.SERVICE_ID WHERE ( t1.CASESTATUs_CD = ('NEW','RETIRED','PENDING','OPEN','CLOSED') OR t1.CASE_STATUS_NUM = (1,2,3,4) ) GROUP BY t1.CASE_REFERENCE,t2.LAST_SCRFP,t1.SERVICE_ID ORDER BY t2.LAST_SCRFP DESC


Previously I have used sed command as below
sed -E 's/\(([^(,$1)'\'']+)\)/('\''\1'\'')/g' Filename.txt
