It's true that in order to taste good, some B-12 supplements (such as dissolvable tablets, liquids, and sprays) contain sugar substitutes which can cause gas, bloating, and diarrhea, as discussed in the B-12 section
of the B Vitamins Review.
If you want to avoid these ingredients, you can check and compare the complete list of ingredients
for each product, or see CL's Top Picks among B-12 supplements
, where there are specific product suggestions, including those which don't contain gas-causing ingredients.