SCHEMA:
CREATE TABLE table_name_18 (tournament VARCHAR)
USER:
What was 2009, when 2012 was A, when 2003 was A, and then the Tournament was the Madrid Masters?

QUERY:
SELECT 2009 FROM table_name_18 WHERE 2012 = "a" AND 2003 = "a" AND tournament = "madrid masters"