If Turkey joins a military strike on Syria and Syria strikes back at Turkey, can Turkey invoke NATO's mutual defense clause according to article 5?
Article 5 is quite specific. It states that
an armed attack against one or more of them in Europe or North America shall be considered an attack against them all
each of them, in exercise of the right of individual or collective self-defence recognised by Article 51 of the Charter of the United Nations, will assist the Party or Parties so attacked by taking forthwith, individually and in concert with the other Parties, such action as it deems necessary, including the use of armed force, to restore and maintain the security of the North Atlantic area.
Note the statement as it deems necessary. The Article 5 is so constructed, that it gives all members in case of attack the formal casus belli, however, each state has full freedom to decide what actions it deems necessary.
For NATO members it means, that being attacked, there's no guarantee of military help of any kind from other NATO members. Other members doesn't even need to declare war on aggressor, they may limit themselves to official diplomatic protests!
Other problematic point is, that the article refers only to the territories in Europe and North America, so the Asian territory of Turkey is excluded. But actually it doesn't change so much because Article 5 doesn't oblige for any actions anyway, and as reason for casus belli it refers the right to collective self-defense recognized by Article 51 of the Charter of the United Nations. That right exists independently from North Atlantic Treaty.
This is muddled by certain events that have already happened - the fact that Syria shot down a Turkish aircraft and that Syrian troops have repeatedly shelled across the Turkish border. These events triggered 'consultations' within NATO but the broader consensus was not to escalate.
It is likely that Turkey's involvement in action against Syria will be under NATO coordination to begin with. The US has, so far, attempted to build a consensus within the UN, NATO, and other international bodies in order to avoid the appearance of acting capriciously - the consensus is largely present, although within the Arab states there are limits on how far the US should proceed. In general, NATO members are continually sharing their threat assessments and coordinate their military responses. While Turkey launches attacks against Kurdish separatist groups either in Turkey or across the border in Iraq, these are not actions against sovereign states and therefore don't, strictly speaking, involve military alliances. An action against Assad, however, is sovereign to sovereign, and is coordinated. Military operations by Syria are therefore against NATO, meaning any NATO assets in Turkey, Europe in general, or the high seas. Whether Assad has the means to project power beyond artillery range remains to be seen.