Switching voltages with demux and switches
At what current? Converting numbers to voltage is exactly the definition of a DAC (Digital to Analog Converter).  We don't know what kind of circuit would be suitable because we have no idea what current/power you are talking about.

But the conventional way of doing this would be to use the binary value to switch in a binary-weighted (1-2-4-8-16...) voltage divider or to use a R-2R ladder.  Then you would take some low DC volage (like 0-5V or 0-12V) and multiply it (with an amplifier) up to the 0-200V desired output.

Or even easier to use an actual DAC chip (which are quite inexpensive) to directly generate the 0-5V signal and amplify that 40x to produce 0-200V, etc.