I do not know if you solved your problem or not yet.
Here is the approach using the IIF SQL function:
Dim strQuery As String =$"SELECT RoomNo AS Room_No, Guest AS Name, Phone AS Phone_No,
IIF(INSTR(StayDays, 'Hr') > 0, Cost, StayDays * Cost) AS Total_Cost FROM Rents
"$
Let me explain the below syntax using the IIF and INSTR functions:
IIF(INSTR(StayDays, 'Hr') > 0, Cost, StayDays * Cost) AS Total_Cost 'use your thai equiv for Hr
If the word Hr (or your Thai symbol equiv) is found in the StayDays column, simply the ToTal_Cost is Cost which is the cost per day. But, if StayDays represents the number of days, then the Total_Cost is the cost per day times StayDays