Array Equivelant to SELECT Query

What is the equivalent of this SQL statement with a “multidimensional” array ([id][name]):

SELECT name WHERE id="6";

The id being a unique primary key, not in any numerical order.