All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad is His slave and Messenger.
If you made a vow to spend the money that you would win from this contest in charity for the Palestinians, then it is incumbent on you to deliver on your vow and give the money that you won from that contest to the Palestinians. In this case, it is forbidden for you to avail yourself of it because this vow is valid and binding, and you are obliged to fulfill it.
Al-Buhooti said: "Shaykh Taqiyy Ad-Deen said, "It is permissible, according to scholarly agreement, to render the vow conditional on possessing something, such as when one says, 'If Allaah grants me money, I would spend it or some of it in charity.' This is supported by the saying of Allaah, the Exalted, (which means): {And among them are those who made a covenant with Allaah, [saying], if He should give us from His bounty, we will surely spend in charity…} [Quran 9:75]." [Kash-shaf Al-Qina']
Hence, it is incumbent on you to spend this money in charity (exactly as you had vowed), and if you took it for yourself, then it would be unlawful for you. This is so if the contest that you joined was lawful. However, if the contest involved gambling, then the money that you won is considered unlawful in origin, and in that case the vow was impermissible to be made and is not considered valid or binding. Instead, you should discard the unlawful money, and the Palestinians are among the people who are most deserving of it.
Allaah Knows best.