You don't need to test or come up with something where we don't have more than a single "%s".

What would be good to have is your original case, a simplified version, where names of columns are tuples.

(writing unit tests is a good skill to practise :)