I just wanted to know what's the best way to add If/Else statements in a SQL query within VB.Net code?
This is my current query (doesn't work):
SELECT
FIRSTNAME, LASTNAME
FROM
TBL_USERS
ORDER BY
If(SortSelect() Is ""lastname"", LASTNAME, FIRSTNAME)
Thanks in advance.