Yes. SQL is used to select required columns from required rows. The data rows don't have row_names unless you've defined a column with the name row_names (this is not done as a rule). At a basic level, retrieving data from an RDBMS is through an SQL statement that is constructed as follows: (This'd be a SELECT statement. The simplest version has the following clauses)
- Pick the table which holds the data of interest (FROM clause). If we want telephone listings, we might query the whitepages table.
- Identify the rows which hold the data of interest (WHERE clause). This is done by putting conditions on column values (there are no row hearders or row names). We want phone numbers for people whose last name is "Hemingway" Here the last name would be a column in the table, not the row name.
- Pick the data columns we want to retrieve (SELECT clause). We want the first name, last name and phone number.
Putting it all together, we might have:
SELECT
first_name,
last_name,
phone_number
FROM
WhitePages
WHERE
(last_name = "Hemingway")
In your case, the SELECT statement would be something like:
SELECT
<name of column 2>,
<name of column 12>,
<name of column 22>,
<name of column 32>,
<name of column 42>
FROM
my_table
WHERE
(<some_column_name> IN ('a', 'b'))
AND (<some_other_column_name> = <some_number>)
AND (<yet_another_column_name> = "<some_text>")
ORDER BY
<a_selected_column>,
<another_selected_column>
If you're going to work with databases on a regular basis, I'd recommend learning a bit more about SQL as you'll have a difficult time getting by with questions on SO or other web sites.
While the 1000 columns you mention might be hyperbole, SQL tables do not normally have hundreds of columns. Consider having your tables and SQL designed by an experienced team member.