colcon simply invokes the unit testing framework used by each package when colcon test is being called.
If that testing framework has command line options to select/deselect specific tests you can easily provide them through colcon. E.g. for pytest you can use colcon test --pytest-args ... and use any of the sophisticated options like:
• markers with -k (https://docs.pytest.org/en/stable/example/markers.html#marking-test-functions-and-selecting-them-for-a-run) or
• regular expression with -m (https://docs.pytest.org/en/stable/example/markers.html#using-k-expr-to-select-tests-based-on-their-name).