select *
from all_objects
where object_name = bj_name
You can right click on the select statement and select test from the pop-up menu. A test window will show up. Press F8 to execute and a SQL tab will have the results.
Since we are on the topic, if you have a query with an ampersand in a literal, it always pops up a window asking for what to put in the "variable" even though it's not intended to be a variable.
It would be nice to have a button on the side to turn substitution variables on and off. Maybe there's another way that I don't know of?