While it is possible to change the space back to a %20 (one of the PHP html...encode functions can do this) passing a query on the end of the URL is a security problem as it will allow someone to change anything they want in your database, including putting their own password in or dropping your tables... test.php?query=DROP TABLE tbl_name
As a matter of security I heavily advise you NEVER EVER to pass a query string through a GET request. This is HIGHLY insecure and will allow anyone to construct a query of their own devising that will cause you no end of problems.
In answer to your question however, what is happening is that the get string is being encoded (i.e. %20 is a space) and thus when interpreted is coming back with the query string you have above.
What you need to do is urlencode your LIKE string, so in your PHP you need to generate the urlencoded version of the string you are sending over your url. The following will give you %20 url encoded, meaning when it gets to the other end it will come out as '%20' and NOT ''.
this will give you %2520 as your urlencoded string. So you query string will be
test.php?query=SELECT * FROM TABLE WHERE FIELD LIKE '%2520'