This is a hypothetical question. Article 8 of NATO's treaty says:
Each party declares that none of the international conflicts now in force between it and any other of the Parties or any third state is in conflict with the provisions of this Treaty and undertakes not to enter in any international engagement in conflict with the Treaty.
Hence the states are ...
If one member attacks another member of NATO, the aggressor is out of NATO via article 8. And then at war with all of NATO via article 5.
Now, you know what's the pinchy topic?
Imagine Turkey attacks Cyprus (that is not in NATO but in the EU).
The EU treaty article 42, item 7. states there is a clause of mutual defense clause (if any member state gets ...