antimetabole
noun
°In rhetoric, the technique of reversal, where accentuated by reversal of words, actions or grammatical structure.