It will be like this:-
Update Student Set Subject='BasketBall'
where class=2 and Hobies like '%basketball%'
If you have multiple conditions the use it like this
Update Student Set Subject=(CASE WHEN class=2 and Hobies like '%basketball%' THEN 'BasketBall'
WHEN class=2 and Hobies like '%Football%' THEN 'Football'
END)