oracle – Executing a query with a variable in a loop

I have two select, how can I do the same using a loop and a variable in PL SQL Developer.
I have:

select 1 as nm from dual;
select 2 as nm from dual;

I need something similar:

DECLARE x NUMBER;
BEGIN
 FOR X IN 1..2
  LOOP
   EXECUTE IMMEDIATE ('SELECT ' || X || ' AS NM FROM DUAL;');
  END LOOP;
END;

In PL SQL Developer, each select is displayed in a separate tab:

enter image description here