I find myself unable to imagine any scenario where a knife can serve as a defensive weapon.
It's really not that hard to imagine. A knife is a close quarters fighting weapon. That means that it is weapon that is most effective when you are standing toe-to-toe w/your opponent/assailant and you have to go hands-on with him (or her).
This is the type of encounter MOST people are MOST likely to have in normal circumstances.
The typical scenario is a verbal argument that escalates into a physical attack. It is unlike the targeted "mugging" that
Lapedog
refers to which actually more uncommon and, in which case, a gun would probably would be a better SD weapon BECAUSE the assailants probably would be at a greater distance (if/when 1st noticed) where a knife would be less effective.
I am ashamed to say that have been involved in a few verbal encounters but fortunately they never escalated into a fight. However, you never know when that might occur and, even if you try to walk away, you can't predict if your opponent may try to attack you nonetheless.
A knife is the best weapon in this kind of situation.
If you are paying attention and are quick enough, just deploying the knife normally can stop a potential (and otherwise unarmed) assailant (which is usually the case) in his tracks (I know this from personal experience) but, if that's not enough to stop the attack, you can end it quickly with just a few (less than lethal) strikes.
Just be cognizant of the legal limits on the use of deadly force (which includes the use of a knife) if/when you need to do so.
This is why I carry a knife and not a gun every day. I only carry a gun when I think that I will be going someplace where the risk justifies it and, since I've moved to the suburbs and retired from law enforcement, I rarely visit such places and therefore seldom carry a gun.