I have a sample table with similar structure & data as shown below:
+------+---------+-------------+------------+ | S_ID | S_NAME | SUBJECT | MARK_V
Please try this.
Select B.* from @tbl AS B INNER JOIN( Select S_Name,MAX(MARK_VALUE) AS MARK_VALUE from @tbl Group by S_Name) AS A ON A.S_name=B.S_Name AND A.MARK_VALUE = B.MARK_VALUE