Recommendations for stored procedure
You can use CASE statements in the ORDER BY clauses to decide which sort order to use:

  SELECT (...)
ORDER BY CASE @OrderBy
           WHEN 'JobNumberDESC' THEN sk.jobnumber
           WHEN (etc.)
         END DESC,
         CASE @OrderBy
           WHEN 'JobNumberASC' THEN sk.jobnumber
           WHEN (etc.)
         END ASC;


(You would have to split up the ascending and descending sort options like that)

One issue with that approach, though, is that in your original statement, I count four places where the ORDER BY statement occurs.  That would mean repeating the long CASE statement a lot.  I think we can fix that, though.

First off, sorting in a subquery usually doesn't make much sense.  I don't see any reason to have keys and selectedkeys sorted, so let's remove those ORDER BY statements.

Now we're left with two ORDER BYs: the one used in the ROW_NUMBER function and the final sort.  No matter what, you need to include the ORDER BY in the ROW_NUMBER function to make sure your paging works correctly, but here's the thing: now you can use that row number to sort the final result (i.e., change the final ORDER BY sk.jobnumber DESC to ORDER BY sk.rn).  Now there's only one place where you need the dynamic ORDER BY clause, which is a lot better than four!

Disclaimer: I haven't tested these ideas; just brainstorming.



Another option would be to use dynamic SQL.  Then you'd have something like this:

DECLARE @OrderByClause varchar(500),
        @sql           varchar(max);

SET @OrderByClause =
    CASE @OrderBy
      WHEN 'JobNumberDESC' THEN 'sk.jobnumber DESC'
      WHEN (etc)
    END;

SET @sql = 'WITH keys
    AS (SELECT TOP (@PageNumber * @PageSize)
        ROW_NUMBER() OVER (ORDER BY ' + @OrderByClause + ') AS rn' +
    (etc.);

EXEC sp_executesql @sql, (etc.);


Just make sure you pay attention to the SQL injection threat.