Something like this:

=IF(A1="Hours", B1*40, B1)