This is SQL, not C#. Please tag your questions properly
I see you're building this SQL in C#, and that your SQL is built in the presentation layer, in a way that lets anyone erase or attack your DB. Read up on SQL injection attacks.
You should grab your SQL string and run it in management studio to debug it. However, the error means that it can't tell what c is, or that the column does not exist.
WHEN 1 THEN i.Loan_id, c.Customer_CNIC ELSE '' END AS LOAN_ID,
This does not work. It's probably the error. Get rid of it, you have when 1, which means you expect it to always run. I think you want
WHEN 1 THEN i.Loan_id ELSE '' END AS LOAN_ID, c.Customer_CNIC