this might do it with a bit of effort:
have field_subject in surrounding field_div (because hiding field_subject might impact what you can do with it)
field_div has conditional: if field_student is certain value then field_div has class .show.
and have conditional on field_subject: if field_student does not have certain value then is filled with “0”
something like that anyway.
or check out the conditionals js that seblod outputs
copy and pate it in to your custom.js , remove the the conditionals, and rewrite it with if statements etc and output it yourself