Now i am get solution
With PivotData as ( SELECT ShapeName,
InvoiceDetails.Purity,
cast(InvoiceDetails.Purity as varchar(10)) + 'KRate' as RValue,
(select Rate from GoldPrice Where Purity=InvoiceDetails.Purity) as 'GoldPrice'
FROM Invoice
INNER JOIN InvoiceDetails ON Invoice.InvoiceId =InvoiceDetails.InvoiceId
Where Invoice.InvoiceId ='Ex2832' )
select ShapeName,Purity,case when ([14KRate]) IS null then (select max([14KRate]) from PivotData pivot (max ( GoldPrice) for RValue in ([14KRate]) ) as pv) else [14KRate]end as [14KRate],case when ([18KRate]) IS null then (select max([18KRate]) from PivotData pivot (max ( GoldPrice) for RValue in ([18KRate]) ) as pv) else [18KRate]end as [18KRate],case when ([22KRate]) IS null then (select max([22KRate]) from PivotData pivot (max ( GoldPrice) for RValue in ([22KRate]) ) as pv) else [22KRate]end as [22KRate] from PivotData
pivot (MAX(GoldPrice) for RValue in ( [14KRate],[18KRate],[22KRate])) as pvt
And Get Result
ShapeName Purity 14KRate 18KRate 22KRate
Gold Caps 14K 14 29.35 37.73 46.12
Faceted Gold Beads 18K 18 29.35 37.73 46.12
Three Piece Set 18 29.35 37.73 46.12
EarRings 22 29.35 37.73 46.12