If Chas Veshalom a Palestinian were to come to me and tell me to convert to Islam or he’d murder me what should I do? On one hand Islam is not Idolitory by any opinion but on the other hand our ansesters have been dying on "Kiddush Hashem" for milennia.
If someone with a weapon approaches you and threatens to murder you, you should defend yourself by wounding and, if necessary, by killing your assailant and removing the threat. All other options are less good and should be rejected if you are at all in a position to defend yourself. Your next best option is to flee. The Rambam in Iggeret HaShmad refers to a situation where neither of the above options were immediately available and the Moslems were forcibly making Jews declare that they were converting to Islam, even though both the Moslems and the Jews knew the declarations were phoney and the Jews continued observing the mitzvot. His advice was to plan one's escape as soon as possible and that until then it was permitted to make such a declaration. Those who refused to make the declaration were, writes the Rambam, doing a mitzva by sanctifying G-d's name. In different circumstances, where the conversion was more than a token declaration one would be permitted and even required to sacrifice one's life only if there were a general attempt at converting Jews (and not just force directed at you alone) or if the conversion were public, before ten Jews. In our time, when thank G-d, Israel has a State and an army of its own a Jew should make certain that he is in a position to be able to fight back and repel anyone who threatens his Jewish commitment.