You need a current source between +Vcc and pin1, of say 2-5ma. Connect 2-3,5-6,7-8,10-11,14-15,16-17,19-20. You need 12 npn transistors(can be ic array e.g. ULN2003 by 2) with each seperate collector connected to the previous connections, as well as, pins:4,9,13,18 and 21. You turn the transistors on only one at a time starting with the collector connected to 2-3 and work upwards in pin numbers. This will turn the segments on as you wish. The transistor emitters should all be grounded, and the bases provide the control. How you switch them is up to you.