Force table to raise non-fatal error when queried

I need to setup a table in MySQL that when queried with a simple query (SELECT * FROM $ table), it returns the data but also raises a non-fatal error. Doesn’t matter what kind of error, just as long as it is non-fatal, so that the query results are successfully returned. Ideas?