Maybe. As long as your check/payment was made to the charity itself OR the event was contracted as a fundraising agent on behalf of the 501(c)(3), you can take it as a charitable donation. Your receipt would show the details and tell you if they are a qualified agent.
If you have a business, however, you can deduct your sponsorship as an Advertising expense as long as you were a published sponsor.