You've got the wrong setup: connect the emitter to ground and add a few resistors.
The base-emitter junction is like a diode, and the base will be 0.7 V higher than the emitter. If you would just apply 5 V to it you're kind of creating a short circuit: there's no resistance between 5 V and 0.7 V. Adding a 2 kΩ resistor will limit the current as per Ohm's Law:
\$ I = \dfrac{V}{R} = \dfrac{5 V - 0.7 V}{2 k\Omega} = 2.15 mA \$
Then the collector current will be a multiple of that. If that's 100 times (you can find the value in the BC108's datasheet as \$H_{21E}\$, which is a name nobody uses, everybody talks about \$H_{FE}\$) then the collector current will be 215 mA, 100 times the base current.
But your transistor will be useless: it will always have 12 V at the collector, no matter what current. And it will get hot: 12 V across it and 215 mA through it is 2.58 W!! Too much for the poor thing. So add a resistor between collector and 12 V:
(Here we also have a LED, but we can do with just the 1 kΩ resistor.)
We had a 215 mA collector current, which would cause a voltage drop across the resistor of 215 mA \$\times\$ 1 kΩ = 215 V!, according to Ohm's Law. But that's impossible, we only have 12 V and a 12 V across the resistor will cause 12 mA current, no more than that. So the resistor limits the current, even when the transistor will try to draw more.
If we would increase R2 to 100 kΩ then the base current will be 50 times smaller, or 43 \$\mu\$A, and the collector current would be 100 times that, or 4.3 mA. Then the voltage drop across R1 will be 4.3 mA \$\times\$ 1 kΩ = 4.3 V. So the collector will be 4.3 V lower than the 12 V, or be at 7.7 V.
So by choosing the right base current you can create a certain voltage at the collector, and when the base current is too high the collector voltage will go all the way to zero.
Note
You can make a circuit like you did, with a resistance between emitter and ground, but then the resistance should be much smaller than the multimeter's, which is often 10 MΩ; a value of 100 Ω will often do. Even then it's not a good circuit here, since the emitter voltage should never go higher than 4.3 V (the 5 V in - 0.7 V base-emitter). You'll never have 12 V there, and I can't even explain that you have a higher voltage than 4.3 V.
edit
"I was thinking of multiplexing four of my displays by putting a transistor before each common anode and then connect all 32 segment cathodes to 8 transistors."
This will work fine. What I described is the driver for one segment. Connect all cathodes for the same segments of the different displays together, and use 8 outputs to drive the 8 transistors.
Then you need something to step from one display to the next.
That will be the part of the circuit around Q1 and Q2 (Q3 is the segment driver). Q1 is a PNP transistor, which will source current to the segments of 1 display, so you'll need 4 of those, plus surrounding parts (Q2, R1, R2 and R3). Q1 will source current to its collector if there's a current from the emitter (12 V) to the base. We get that current by activating Q2, an NPN transistor like we saw earlier. So if you make "Display 1" high there will flow a current from 12 V through Q1's emitter-base and R2 to Q2's collector. You can use a BC807 for Q1.
Note: I would ditch the BC108. It's an old beast, and Digikey, which sells everything, doesn't even list it. Alternative: BC337; high \$H_{FE}\$ selections available, and 500 mA maximum current.
Actually I didn't notice this was about an open collector output until miceuz posted his comment, so for OC output I would use one of these
and the isolated version
If the GPIO can't provide enough current to the optodiode to get the appropriate output current in the transistor side then you'll have to add another transistor either to the input or output.
Note that resistor values may vary depending on the requirements
2) How can I figure out what ohm value of resistor to put between the gpio and the base?
A rule of thumb is that you have to provide 1/10 to 1/20 of the output current in the transistor base in order to saturate the transistor and get a low collector-emitter voltage drop (which means higher voltage output and less heat dissipation)
Best Answer
simulate this circuit – Schematic created using CircuitLab
I achieved something similar with the below circuit. Does use some extra components, but will happily switch the 12V on and off!
Whilst I think this achieves what you're looking for - i've found it to be better to use a transistor to switch the path to ground on or off, rather than using it to turn the 12V supply on.
See Below;
simulate this circuit