Note that you can put conditions before the braces, so you can also express the example
awk '{if ($(NF-2) == "200") {print $0}}' logs.txt
as awk '$(NF-2) == "200" { print $0 }' logs.txt
IMO, this style scans easier for most of the grep-ish use cases.