The following might be oversimplified. One approach is to use the VSI's Comparison Operator to send a response.
1) In the VSI, assign the 'vid' as a numeric
2) Allow META to respond with the HTTP 400 Bad Response
Body is empty
Meta Data has HTTP 400 Bad Response
3) Create two specific transactions.
In the first specific txn, the comparison is vid <1 (response for all VID values less than 1)
In the second specific txn, the comparison is vid >= 1.5 (response for VIDs greater than 1.5)
Running the test from Postman:
Your requirements are likely more complex than the scenario above demonstrates.
Other techniques range from examining the 'vid' attribute via a Scriptable Data Protocol filter and setting the response meta data values accordingly to using response-side DPHs to set the HTTP Response Code and HTTP Response Code text. These techniques are a bit difficult to describe in a thread such as this, but Prema's approach above is the most likely way forward.