As Tomas Takac says, you need to know about PIVOT. As well as the link he has provided there are several articles here on CodeProject.
Here is an example of how your sample data could be pivoted
select remittance_no, messenger, item, item_value, product
, isnull([2015-12-04],0) as day1
, isnull([2015-12-05],0) as day2
, isnull([2015-12-06],0) as day3
, isnull([2015-12-07],0) as day4
, isnull([2015-12-08],0) as day5
from
(
select remittance_no, remit_date, messenger, item, item_value, rate.product, rate.product_value
FROM remittance
INNER JOIN rate
ON rate.product=remittance.item
) as sourcedata
PIVOT
(
sum(product_value) for remit_date in ([2015-12-04], [2015-12-05], [2015-12-06],[2015-12-07],[2015-12-08])
) pvt
which provides the results
REMMKT00003 MESSENGER 3 PRODX 150 PRODX 6.75 0 0 0 0
REMMKT00004 MESSENGER 3 PRODX 7 PRODX 0 6.75 6.75 5.25 5.25
It is highly likely though, that you are not going to know which dates are required in the final result. In which case you need to know about Dynamic Pivoting. This
post[
^] includes an example of Itzik Ben-Gan's approach to building the pivot column list dynamically.
[EDIT - some further information after a comment below]
There are lots of articles here on CodeProject that can guide you through connecting to MySQL - e.g.
Connecting to MySQL Database using C# and .NET[
^]
To get your new query built using a DateTimePicker you can do something similar to the code that follows. I've assumed that you want the data for the 14 days preceding the date in the dtp plus the date on the dtp.
Dim sCommand As MySqlCommand = New MySqlCommand()
Dim sqlQuery As StringBuilder = New StringBuilder()
sqlQuery.Append("select MSGR,PRODNAME,RteVal,")
Dim CalcDate As Date = DateTimePicker1.Value.Date.AddDays(-14)
For i As Integer = 1 To 15
sqlQuery.Append(String.Format("sum(case when rmdte = @Date{0} then ProdVal else 0 end) `DAY {1}`,", 15 - i + 1, i))
sCommand.Parameters.AddWithValue(String.Format("@Date{0}", i), CalcDate)
CalcDate = CalcDate.AddDays(1)
Next
sqlQuery.Append("sum(ProdVal)*rteval as Total from")
sqlQuery.Append("select date(remit_date) as rmdte, messenger as Msgr, item as ProdName, item_value as ProdVal,")
sqlQuery.Append("b.product as RteProd,b.product_value as Rteval FROM remittance a JOIN rate b on a.item=b.product")
sqlQuery.Append("where a.messenger = 'MESSENGER 3' and b.ratecode = '5i.35' ) as SOURCEDATA group by ProdName")
sCommand.CommandText = sqlQuery.ToString()