When walls, or indeed fences or railings, form the boundary of the course, they are deemed to be fixed, and no relief is available should your ball be lying so close to them as to make your next shot either very difficult or impossible.
You can always attempt to play the ball in some way, whether via a shortened stroke, playing in the wrong direction or attempting a ricochet off the wall.
But do remember that under Rule 14.1, the ball must be fairly struck at, and anything that constitutes a pushing, scraping or spooning action will cost you a general penalty, two strokes, or loss of hole in match play.
If you decide not to play it, you may proceed under Rule 19 (unplayable ball), in which theoretically at least, you have three options, all under penalty of one stroke.
1. You can go back to where you last played from; drop within two club-lengths not nearer the hole.
2. Go back as far as you like on a line keeping the point where your ball lies between you and the flag.
3. Drop the ball within two club lengths not nearer the hole.
Our boundary wall runs parallel to the hole and beyond the green, therefore the second option outlined above might not be available as you can't drop your ball out of bounds!
Also as the boundary wall is beyond the green, the third option won't be available either, as it is impossible to drop within two club lengths not nearer the hole.
So the harsh reality is that sometimes the only realistic option when your ball is lying next to the boundary wall will be the long walk back to where you last played from (i.e see Option 1 above).