Normales SQL würde einfach
verwendenSELECT COLUMN1, COLUMN2, COLUMN3, COLUMN4 from <TABLE>
also wahrscheinlich so etwas wie
@Query("SELECT " + desiredSubcategory1 + " AS subcategoryValue1 + "," +
desiredSubcategory2 + " AS subcategoryValue2 + "," +
desiredSubcategory3 + " AS subcategoryValue3 + "," +
desiredSubcategory4 + " AS subcategoryValue4 + "," +
"FROM subcategory_table")
List<Subcategory> getSubcategory(String desiredSubcategory);