The example you are showing is trying to use Output Parameters. Unfortunately, using a select everything query, this isn't doable. What you need to do is fill a DataTable and get the values out of it.
using(SqlConnection connection = new SqlConnection(_connectionString))
{
SqlCommand command =
new SqlCommand("SELECT * from Variables WHERE ID = @ID", connection);
command.Parameters.Add("@ID", SqlDbType.Int);
command.Parameters["@ID"].Value = Main.pattern3.Text;
SqlDataAdapter dataAdapter = new SqlDataAdapter(command);
DataTable dataTable;
dataAdapter.Fill(dataTable);
main = (String)dataTable.Rows[0]["Main"];
amenu = (String)dataTable.Rows[0]["Data"];
amenu1 = (String)dataTable.Rows[0]["DataDetails"];
}
If you wanted to stick with output parameters, you would need to switch your SQL statement to a stored procedure.