Try this
DECLARE @CustMinLoanInstallments AS TABLE(Customer_CNIC VARCHAR(100),Loan_Id VARCHAR(100),
MinInstallments BIGINT)
INSERT INTO @CustMinLoanInstallments
SELECT i.Loan_id , C.Customer_CNIC MIN(Installment_No)
FROM Installments AS i , Customer AS C
WHERE i.Loan_id =C.Loan_id
SELECT CASE i.Installment_no WHEN cmli.MinInstallments THEN i.Loan_id ELSE '' END AS LOAN_ID,
'Customer_CNIC' = CASE WHEN i.Installment_no = cmli.MinInstallments THEN @CustCNIC ELSE ''END, i.Installment_no, i.Date, i.Amount
FROM Installments i, Loan l, Customer c ,@CustMinLoanInstallments cmli
WHERE l.Loan_id = c.Loan_id and c.Loan_id = i.Loan_id
AND cmli.Loan_id = i.Loan_id and cmli.Customer_CNIC = c.Customer_CNIC
ORDER BY l.Loan_id,i.Installment_no
Hope this helps
--RDBurmon