Determine the resistor required for a circuit
It depends on the current required for your device.

If the current required is next to nothing, then a simple voltage divider will do it.

If you're not too fussy about the voltage and the current requirement is modest (1-5 mA), a shunt regulator made of three 1N4148 type diodes in series with a 5-10K resistor to 12V can make approximately 2V (each diode has about 0.66V Vf drop at that current.)

If you need more current draw than that, you will need to consider using a voltage regulator to set the voltage output for your system. 2V isn't a common standard voltage, but you can use an adjustable type to make that output.