Replace a var in sql file with shell script variable

I have a requirement where i have a sql file (filetext.sql). This file contains a variable ss_code.
Now in a shell script im trying to replace the variable ss_code with a value contained in the shell script variable MTK_DC..tried the below in the script

MTK_DC="mit,cit,bit"
OUT=`awk -v ss_code=$MTK_DC '{print}' filetext.sql` # prints as such the sql file .. without replacing the variable
MTK_DC="mit,cit,bit"
OUT=`awk -v bb_code=$MTK_DC '{gsub(ss_code, "bb_code")}1' filetext.sql` # this gives undesired output

Kindly throw some light..

Pls note:sql file and the shell script file are two different files present in the same location

Post the sql file and the desired ouput.

This is my sql file:

after running the below script

MTK_DC="'mit','cit','bit'"
OUT=`awk -v bb_code=$MTK_DC '{gsub(ss_code, "bb_code")}1' filetext.sql` # this gives undesired output

the sql file should change to

i have tried and got the desired o/p by changing the script as below. Pls tell me if the same could be got thru sed command

MTK_DC="'mit','cit','bit'"
OUT=`awk -v bb_code=$MTK_DC '{gsub("ss_code", bb_code)}1' filetext.sql` # this gives undesired output

Try this:

MTK_DC="'mit','cit','bit'"
awk -v var=$MTK_DC '/ss_code/{sub("ss_code", var)}1' filetext.sql

Thanks.. it worked out..