Many people consider Judo as a sport but originally Judo was and is a combat martial art. But with its heavy emphasis on physical conditioning and competition, it soon began to lose connection with its combat origins, and started to focus only on the sporting aspect.
I have personally used judo/jujutsu in a street fight to great effect and it will help you in a self defense situation. But the art of judo was not designed for street fights, it was designed to introduce jujutsu. You will not learn to block or evade punches in judo and it works best if you can get close to your opponent.