You can still get sick from Salmonella when you cook the chicken if the chicken isn't cooked thoroughly.
Cooking the chicken kills off the Salmonella so if you thoroughly cook the chicken then the bacteria that causes Salmonella will be killed off and you won't get sick.
This goes for any other food.
People are at risk for Salmonella poisoning if they eat under cooked or raw meat or consume any unpasteurized items.