How to make this query simpler SELECT IH.InvoiceNo,
    C.Name AS NameofCustomer,
    IP.Amount AS CashAmount,
    0 CreditNote,
    0 ChequeAmount,
    0 Credit,
    IP.Amount AS SalesValue 
  FROM InvoiceHeader IH
LEFT JOIN Customer C ON IH.CustomerId = C.Id
LEFT JOIN InvoiceDetail ID ON ID.InvoiceNo = IH.InvoiceNo
LEFT JOIN DistributionCenter DC ON DC.Id = ID.DistributionCenterId
LEFT JOIN InvoicePayment IP ON IP.InvoiceNo = IH.InvoiceNo
WHERE DC.Id = 1 AND IP.PaymentTypeId=1 AND IP.InvoiceDate 
BETWEEN'2018/05/01' AND '2018/06/19' AND IH.Deleted = 0 
  UNION
SELECT  IH.InvoiceNo,
     C.Name AS NameofCustomer,
     0 CashAmount,
     IP.Amount AS CreditNote,
     0 ChequeAmount,
     0 Credit,
     IP.Amount AS SalesValue 
FROM InvoiceHeader IH
LEFT JOIN Customer C ON IH.CustomerId = C.Id
LEFT JOIN InvoiceDetail ID ON ID.InvoiceNo = IH.InvoiceNo
LEFT JOIN DistributionCenter DC ON DC.Id = ID.DistributionCenterId
LEFT JOIN InvoicePayment IP ON IP.InvoiceNo = IH.InvoiceNo
WHERE DC.Id = 1 AND IP.PaymentTypeId=2 AND IP.InvoiceDate BETWEE'2018/05/01' 
AND '2018/06/19' AND IH.Deleted = 0 
 UNION
    SELECT  IH.InvoiceNo,
     C.Name AS NameofCustomer,
     0 CashAmount,
     0 CreditNote,
     IP.Amount AS ChequeAmount,
     0 Credit,
     IP.Amount AS SalesValue 
   FROM InvoiceHeader IH
   LEFT JOIN Customer C ON IH.CustomerId = C.Id
   LEFT JOIN InvoiceDetail ID ON ID.InvoiceNo = IH.InvoiceNo
   LEFT JOIN DistributionCenter DC ON DC.Id = ID.DistributionCenterId
   LEFT JOIN InvoicePayment IP ON IP.InvoiceNo = IH.InvoiceNo
   WHERE DC.Id = 1 AND IP.PaymentTypeId=3 AND IP.InvoiceDate BETWEEN 
  '2018/05/01' AND '2018/06/19' AND IH.Deleted = 0 
   UNION
 SELECT  IH.InvoiceNo,
     C.Name AS NameofCustomer,
     0 CashAmount,
     0 CreditNote,
     0 ChequeAmount,
     IP.Amount AS Credit,
     IP.Amount AS SalesValue 
 FROM InvoiceHeader IH
 LEFT JOIN Customer C ON IH.CustomerId = C.Id
 LEFT JOIN InvoiceDetail ID ON ID.InvoiceNo = IH.InvoiceNo
 LEFT JOIN DistributionCenter DC ON DC.Id = ID.DistributionCenterId
 LEFT JOIN InvoicePayment IP ON IP.InvoiceNo = IH.InvoiceNo
 WHERE DC.Id = 1 AND IP.PaymentTypeId=4 AND IP.InvoiceDate BETWEEN 
 '2018/05/01' AND '2018/06/19' AND IH.Deleted = 0 
 ORDER BY IH.InvoiceNo 


Amount has values that paid and PaymentTypeId has the payment type. I am trying to retrieve data into 4 colomns with condition of PaymentTypeId = 1,2,3 or 4  this is the query i got. Are there any simple way to this task?
Well, at least it seems like you can get rid of the UNIONs. Use a CASE ... END to get the values for cashamount, creditnote, chequeamount and credit depending on paymenttypeid. Use IN (or multiple OR) to filter for paymenttypeid in the WHERE clause.

SELECT DISTINCT
       ih.invoiceno,
       c.name nameofcustomer,
       CASE ip.pamenttypeid
         WHEN 1
           THEN ip.amount
         ELSE
           0
       END cashamount,
       CASE ip.paymenttypeid
         WHEN 2
           THEN ip.amount
         ELSE
           0
       END creditnote,
       CASE ip.paymenttypeid
         WHEN 3
           THEN ip.amount
         ELSE
           0
       END chequeamount,
       CASE ip.paymenttypeid
         WHEN 4
           THEN ip.amount
         ELSE
           0
       END credit,
       ip.amount salesvalue 
       FROM invoiceheader ih
            LEFT JOIN customer c
                      ON c.id = ih.customerid
            LEFT JOIN invoicedetail id
                      ON id.invoiceno = ih.invoiceno
            LEFT JOIN distributioncenter dc
                      ON dc.id = id.distributioncenterid
            LEFT JOIN invoicepayment ip
                      ON ip.invoiceno = ih.invoiceno
       WHERE dc.id = 1
             AND ip.paymenttypeid IN (1, 2, 3, 4)
             AND ip.invoicedate BETWEEN '2018/05/01'
                                        AND '2018/06/19'
             AND ih.deleted = 0;


Note, that UNION eliminates duplicates. So I added DISTINCT to have duplicates eliminated in this version too. Remove it, if this side effect of UNION wasn't actually wanted or if there cannot be any duplicates (I don't have the complete picture of your schema to judge that.).

But, it's only a shorter query text. Depending on the existing indexes, your first approach might execute faster. Check the execution plans, when in doubt.