A .22 is definitely sub-optimal, but one could argue that about any handgun caliber. I often carry a NAA Black Widow in .22 Magnum in my pocket, but I sincerely hope that if I ever run into someone who intends to do me grievous harm I have something more potent at hand.
Rimfire ammo isn't as reliable as centerfire, so I'd definitely go with a revolver, and I'd want as many shots as possible. Given that, I'd vote for a 10-shot Model 617. If I wanted to carry concealed, I'd grab one of the 8-shot 3" Model 63s when they finally appear.
Would either be *good*? No. But, as others have said, either would be better than nothing at all.
EDIT: I just realized you said .22 *caliber*; if you include magnums in the equation I'd change my vote to the 351PD. A .22 WMR fired from a short barrel is *loud*; it might be enough to make the bad guy change his mind even if the bullet headed his way doesn't.