Personally I think this depends less on the weapon and more on the situation and perk load out. For the sake of the point (IE: Close Quarters) I'm going to assume that you're just outside of knife range.
If you're sprinting around a corner or into a room your speed to get into ADS is going to be a tad slower. In this case, regardless of the weapon you're using, just hold down the fire button and spray until nothing is moving (obviously try to hit the baddie). IF you're using a sniper rifle you've got 2 options: Pull the trigger and hope to mighty Cthulhu that you hit, or swap to alternate weapon and start unloading.
If you're waiting around a corner and someone comes to you (assuming you aren't already in ADS gazing intently at the corner): With SMG if you have Sleight of Hand Pro (Puts you into ADS faster) go into ADS and unload, otherwise just got nuts again and start spraying. Same issue with sniper rifle too.
Lastly (and this is the method I strongly suggest), you can go into ADS WHILE shooting. This means you can start hip firing has you're going into ADS mode. In a CQC situation where I'm caught off guard by someone this is what I always default to. I start firing as I'm going into ADS. If you don't understand exactly what I mean here, create a private game and select an automatic gun. Hold down the trigger button and then go into ADS and back out of while still holding down the trigger. The gun will never stop firing and the accuracy improves when you move into ADS.
More often than not it'll just be better to start spraying if you can't get the knife off. Guns in Black Ops shoot fast enough and generally have enough accuracy that the first one shooting in a close up fight has the advantage.
Also, if this is a big problem you have while playing I highly suggest Sleight of Hand Pro. I use it religiously.
TL;DR:
Step 1: Shoot;
Step 2: ADS;
Step 3: ???;
Step 4: Profit;