I am selecting few rows from database e.g.:

select * from student where name is like %ram%

Result:

ID   Name     email          Branch
7    rama    rama@gmail.com    B1
5    ramb    ramb@gmail.com    B2
3    ramc    ramc@gmail.com    B3
8    ramd    ramd@gmail.com    B4
11   rame    rame@gmail.com    B5
12   ramf    ramf@gmail.com    B6
14   ramg    ramg@gmail.com    B7

I need to get row number for which branch is B5. Expected value is "5"

Can someone please suggest How to implement this in query ?

Edit
Report