title: How to select columns whose names are in a column from another table?
body: <p>In a PROC SQL how to do this?</p>
  <pre><code>PROC SQL;
  
  CREATE TABLE SASUSER.COLS (
      COL VARCHAR(20)
      );
  
  INSERT INTO SASUSER.COLS
  VALUES('NUM_ENQ_ANO')
  VALUES('NUM_ENQ_IDT')
  VALUES('BEN_RNG_GEM')
  VALUES('NUM_ENQ_IDT')
  VALUES('BEN_SEX_COD')
  VALUES('BEN_NAI_ANN')
  VALUES('BEN_NAI_MOI');
  
  CREATE TABLE SASUSER.TEST AS
  SELECT (SELECT * FROM SASUSER.COLS)
  FROM LIBERICO.IR_BEN_R_202107;
  QUIT;
  </code></pre>
  <p>The error message is this one:</p>
  <pre><code>ERROR: Subquery evaluated to more than one row.
  </code></pre>