Well, yes - assuming you're shooting the same size pellets in each. But for HD use a better comparison might be between 12ga 00 = 9 .33 caliber pellets, 20ga #3 = 20 .25 caliber pellets. Both have approximately the same velocity so we're still talking about a significant amount of energy transferred to the target, and at HD distances both typically pattern about the size of your fist. And there's the advantage of a lighter gun with less recoil.do you want a 20 vs a 12 for reasons? if there is no hard reason, a 12 is going to give you more pellets per load and thus a higher percentage of stopping the guy.
One of the "real" Shotgun Guru's, Massad Ayoob, did a really good writeup on using a 20ga for HD a few years ago. Link: Consider the 20-gauge shotgun