Get a medium-large size 357 magnum revolver. Ruger or S&W.. clearly, because I am here, I am partial to S&W, but Rugers are great guns too. Stay away from Taurus.
The 357 allows you to shoot light loaded .38 specials which, out of a large and heavy enough gun, feel like 22's. You can then work your way up to a 357 magnum ammunition once your skills and comfort grow.
I agree with the others though... shoot shoot shoot shoot shoot... one gun, even a GREAT gun, might not be for everyone.
22s are fun - and very deadly.. but in a defensive scenario, as other have said - isn't nearly as powerful and effective in a 2-3 shot initiative as a .38, 357, 9, 40..etc.
The MOST important thing is the ability to hit what you are wanting to hit. if you can't do that with a rock, a branch, a 22, or a 12 gauge... it doesn't matter what you have.
Also, make sure you understand that every top of the line ammunition manufacturer makes low recoil, high powered defense rounds. these are expensive to plink with, but highly engineered to do the most damage to a target with minimal recoil/effect on a shooter. Something to consider when you need to protect your family at 2am coming out of REM sleep.
Practice practice practice. Understand that everyone here has opinions.. most all of them are highly valid. learn from everyone here... there are people here that have been shooting for longer than I have been alive and in my short time on this forum, my knowledge has increased dramatically!
Final opinion on your query... if you eventually want to use your first gun as a defensive weapon... buy a 357 mag with good weight, not a snubby... start with low power .38 cartridges, then move up as your skill and comfort grows. If you have no desire to use it as a defensive weapon, get the 22... sooooo much fun, veeery cheap ammo. to quote hicock... there is nothing more american than plinking cans with a 22.