I recommend only taking a B12 supplement if you have tested positive for a deficiency.
The only accurate test that will indicate a B12 deficiency is a urinary MMA test. A B12 in-serum blood test is inaccurate and the blood homocysteine test is inaccurate as well. Many doctors have no idea what a MMA test is and will refuse to order one for you. They only took one nutrition course in med school but still think they know more than you. Insist on the uMMA test. The in-serum test indicates inactive B12 analogues as well as active B12, and the homocysteine test can indicate issues other than a B12 deficiency. They will work in a pinch, and the in-serum test will generally do a good job of indicating a deficiency, but if you want truly accurate results, go for the gold standard - the uMMA. If you're considering injecting a foreign substance into your veins or dissolving a packed powder in your mouth, definitely look for accurate results so there is as little room for error as possible.
If you decide to take a B12 supplement after finding out that you have a deficiency, you should take a methylcobalamin, adenosylcobalamin, or hydroxocobalamin supplement. These should be in either an injection form or sublingual (dissolves in the mouth.) For some people, only the injection form will work, but studies have shown that the sublingual is more than capable of correcting deficiencies in most people. Based on my readings, it seems a methyl/adenosyl combination tends to work better than methyl by itself. Some people will react differently to different forms, sometimes these differences will be significant. Both the sublingual and the injection form can have unwanted side effects, which is why I recommend to only "supplement" if you actually need to (based on a real lab test, not your "intuition" or 5 symptoms that you decide point to a B12 deficiency even though they are shared with dozens of other medical conditions.)
Do not take a cyanocobalamin supplement as this is a toxic, cheap, long-shelf life form of B12 that doesn't do you any good and also contains cyanide. The cyanide molecule is released as your body converts cyanocobalamin into a usable form, an inefficient and toxic task. It has been shown to correct B12 deficiencies, but at far greater levels, and obviously the toxicity is questionable. In a pinch it will work, but you don't want to be in a pinch.
Be aware that this is not a vegan problem. A recent Tufts university study showed that nearly 40% of the U.S. adult population was either deficient or in the "low" range in vitamin B12 - a population that consists mainly of meat-eaters. Note that many people in our "modern society" are only spared from a B12 deficiency because of the massive amount of cyanocobalamin they ingest via processed foods that are mandated by the goobermint to be fortified.
For further reading, check out the book "Could it Be B12?"
Oh I'll definately stop taking the pills then!