title: Spring JPA : Query one column from the table without where clause
body: <p>I am new to JPA and Spring Boot and trying to write a custom query which returns only one column from the table when the API is triggered. But I get an error doing so. It would be helpful if someone could guide me to a correct way of writing this custom query. </p>
  
  <pre><code>// Controller class
  @Autowired
  private UserTestInstanceDao usertestdao;
  
  List&lt;String&gt; usertestinst = usertestdao.tempQuery();
  
  // DAO class
  
  public interface UserTestInstanceDao extends CrudRepository&lt;UserTestInstance, Long&gt; {
  
  @Query("SELECT ti.test_name FROM test_instance ti")
  public List&lt;String&gt; tempQuery();
  
  }
  </code></pre>