If you flush the shared pool, all the statements in cursor will be flushed. So if you want a sql query to do hard parsing, then you can flush the particular sql statement from shared pool.

STEPS:

1. Get the address and hash_value of the sql_id:

2. Now purge the sql statement 

exec DBMS_SHARED_POOL.PURGE (‘ADDRESS,HASH_VALUE’,’C’);

 

Altenatively  you can the the script provided by Carlos Sierra.

flush_from_cursor.sql

output:

 

Reference – https://carlos-sierra.net/2013/02/28/how-to-flush-one-cursor-out-of-the-shared-pool/