'How to resize all NVARCHAR(n) columns at once?

I wonder if something like the following is possible to achieve:

ALTER TABLE dbo.[Foo] 
    ALTER COLUMN * NVARCHAR(500) 
    WHERE Columns NVARCHAR(n) < NVARCHAR(500);


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source