Found something that seems to work:
if(wildmatch(text_field,'*Q2*')=0,'NO','Q2'&left(subfield(text_field,'Q2',2),8)) as my_field;
It works as follows:
if the text field contains one of the references we are looking for it takes the part of the string to the right of 'Q2', then extracts 8 characters starting from the left and adds 'Q2' at the beginning.
Otherwise it includes the word 'NO' in my_field.
So kind of sorted.