Brazilian Jiu-Jitsu--the Gracie version, not the pure sport version--prepares you for both stand-up armed and unarmed encounters and the very important ground game. This is of course assuming that you're only able to train in one martial art; cross training is always best. Also, know that any scenario involving a weapon automatically puts you at a major disadvantage, no matter what you've trained or how much (especially if they're coming up behind you).
As others have already suggested, the best option is typically to avoid/run from the situation, and this is coming from someone who teaches self-defense seminars on a regular basis. Your first option should always be to escape. Always.
No martial art is perfect, but if you're considering going out and joining a school, you should be aware of where some arts are lacking:
Brazilian Jiu-Jitsu-some schools only teach the "sport" version, which is great for a work out and learning the intricacies of leverage, but it can mean that you won't learn how to properly defend yourself from common street attacks: like a bear hug or a knife attack for example. A good school will teach both, sport and self-defense. In my opinion, a mix of both, rather than a focus on just one over the other, is best. So be aware. Also, some instructors will teach self-defense on request but tend to focus on the sport aspect because that's what most students want, so just ask before signing up.
Aikido-Aikido is a beautiful, highly technical martial art. What Aikido masters are able to do with leverage and positioning is amazing. Unfortunately, the nature of Aikido techniques prevents you from training with them at full intensity or near full intensity. You're limited to responding to rehearsed attacks with rehearsed counters. There is typically no truly live sparring. If you've never simulated a fight and suddenly find yourself in one, it will be a very painful experience. Arts that promote sparring are great for developing your ability to remain calm and think rationally in a stressful situation.
Judo-Judo and Brazilian Jiu-Jitsu are very similar in terms of technique, though many Judo schools focus almost entirely on throws and do very little ground work. This is a result of Judo becoming more of a sport than a martial art, which is important to be aware of for all the reasons I described about sport focused BJJ schools. Judo throws are really frickin awesome, and it's a great feeling to launch someone into the area with a Judo throw, but the ability to execute a throw is worthless if you're not used to dealing with punches or used to finishing an opponent once you do take them to the ground (with strikes, a joint lock, or a choke).
Karate-the speed and precision of Karate strikes is stupefying. Karate guys (or any striking heavy art for that matter, like boxing or Muay Thai) are wizards on their feat. They're great at working angles and chaining combinations. If you sign up for a Karate program, be wary of two things: Karate is heavily afflicted by McDojos, people who open schools that have no real credentials or business teaching and are just looking to cash in; and you need to be prepared for the ground. If a Karate school is giving black belts to 8 year olds, be wary. On top of that, know that you need an answer for the clinch and the takedown; your awesome kicks and punches are no good with your back on the pavement.
Jeet Kune Do-I love the philosophy of Jeet Kune Do (I even have the Jeet Kune Do yin-yang tattooed on my back), but the problem with JKD is that it's very difficult to find a legit instructor. There are thousands of people that claim to teach JKD and to have trained with Bruce Lee. Ask for credentials. Get their instructor lineage, and attempt to verify it (the International JKD Association is a good place to start). Don't let yourself get conned. If you do manage to find a legit JKD school, you're in luck. You'll be a very well-rounded fighter.
Krav Maga-I've worked with a lot of Krav guys and have incorporated many of their self-defense techniques into my repetoir for when I give short seminars to sororities or similar groups (many BJJ self-defense techniques assume that you're comfortable with going to the ground, which is not something you can assume with 19 year old girls who have never practiced a martial art in their life). I think that Krav is a great martial art, but it's also a military martial art. Though it draws upon the principles of leverage and requires a great deal of technique, many of their techniques are designed for athletic men (requiring a series of explosive movements for example) in a military context (the Army Combatives instructors say that in a war, the winner of a hand-to-hand fight is whoever has a friend show up with a gun first). Krav Maga has some ground work, but it doesn't address the full complexity of grappling, which is a major issue for people that can expect to always be smaller and weaker than their attackers.
MMA-mixed martial arts is a sport. I love it to death, but it's still a sport. If you go to an MMA gym, don't expect to ever address self-defense scenarios. You'll learn a lot about a lot of different aspects of fighting, but there are two things you should be aware of you decide to sign up at an MMA-focused gym: you won't be learning self-defense, and if you have no experience in any sort of martial art, there's a very good chance that you'll get hurt. That said, experienced MMA guys are bad asses, and I would never count them out in a fight, but if self-defense is your primary concern, you may want to look elsewhere.
These are of course, just my humble opinions. Pick whatever martial art you like and enjoy training. You'll get the most out of whatever art you love. Just be aware of its limitations and devote some time to patching up those holes.