Para corresponder exatamente à sequência final entre colchetes:
perl -alne 'm/S?SELECT.*?(?=\[ \S+ @ \S+ \]$)/ && print $&;' file
saídas
SELECT PRINTER.LOCS WITH SHIP.TICK.BR = "15"
SSELECT PRODUCT BY STK.LN.SEQ
SELECT ORDER.QUEUE WITH &INDEX&.STATUS = "S~S]" "H~S]" "A~S]" "M~S]" AND WITH &INDEX&.SBR "51 17~]"
SSELECT UD.VIEWS WITH &INDEX& = "ORDERENTRY.ORDERENTRY~0"