How to convert HSV to RGB using shader nodes?
Is this an exercise,  or ....

... will this do?...
EDIT: No, it won't. If you want to do logic like this by hand..
One way to approach the case statement would be use the implicit cast of True and False to 1 and 0, and multiply the truth-value of the case-condition with the color that would result if it were true.

.. so the above cluster says (v,t,p) * (i == 0) + (q,v,p) * (i == 1) +....
If the i == 0 condition is true, then the (v,t,p) contributes to the sum of colors. If the condition is false, it contributes (0,0,0).  Only one case will be true, and contribute more than 0 to the sum.
You then accumulate a sum of all the colors:

But this stuff can be tedious to debug.. @Rich Sedman's kit can be a fantastic time-saver.