Tried to find the answer, but still couldn't.. The table is as follows:
select name from table where (name='Ratna' and name='Ima')
You have several rows, but you want to look at a set of rows. This is called aggregation. In your case you want to look at each room chat, so you
group by room_chat. You want to know whether for a room chat you find both names, so count the names.
select room_chat from table where name in ('Ratna','Ima') group by room_chat having count(distinct name) = 2;