One common keyword that you can use is the
CASE[
^]. An example on how to use it can be seen on the link. You can also check my sample SQL script below.
SELECT book_code,
[book title],
stock,
CASE
WHEN stock = 0 THEN 'YES'
ELSE 'NO'
END AS 'AVAILABLE'
FROM [YOURTABLE]