LIMIT is an optional clause that can be added to a SELECT statement of a SOQL query to specify the maximum number of rows to return.
SELECT AccountId , Priority FROM Case LIMIT 4